In this era of Big Data, large-scale processing of large amounts of data can be performed on distributed hardware in a distributed filesystem. In a multitenant environment, there is a need for access control of data blocks, so that data belonging to each tenant is secure. Yet, the distributed nature of such a system poses data security challenges. Some operating systems do not interact well with other operating systems in terms of data security. For example, Hadoop can be used as a framework for large-scale processing, in which Hadoop is used as a first operating system for one or more name nodes, and a local operating system is used as a second operating system for one or more data nodes, under which data blocks are stored. One problem in such a distributed filesystem is that often the first operating system is not aware of the owner of the data. This renders access control for data blocks difficult in not impossible. One workaround is to define and apply an encryption key in a local filesystem namespace, but this imposes a burden on the system and the users, and is not transparent to the users. Furthermore, such an encryption key cannot be defined and applied selectively on a basis of individual files at the level of the first filesystem (e.g. HDFS, the Hadoop distributed file system). Administrators in the first filesystem have unrestricted access to unencrypted data, since the super-user has the same identity as the name node process itself. Therefore, there is a need in the art for a solution which overcomes the drawbacks described above.